<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

	<head>
		<title>历史订单</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="../../css/style.css" rel="stylesheet" type="text/css">
		<link href="../../css/layui.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../../../js/vue.min.js"></script>
		<script src="../../../js/layui/layui.js"></script>
		<script src="../../script/common.js"></script>
	</head>

	<body>
		<div class="page_title">客户信息管理 > 客户信息 > 历史订单 </div>
		<div class="button_bar">
			<button class="layui-btn layui-btn-normal" onclick="help('');">帮助</button>
			<button class="layui-btn layui-btn-normal" onclick="back();">返回</button>
		</div>
		<div id="app">
			<table class="query_form_table">
				<table class="query_form_table">
					<tr>
						<th>客户编号</th>
						<td><input type="text" value="KH071202001" class="layui-input" style="width: 200px;" readonly /></td>
						<th>客户名称</th>
						<td><input type="text" value="聪海信息科技有限公司" class="layui-input" style="width: 200px;" readonly /></td>
					</tr>
				</table>
			</table>
			<br />
			<table class="layui-table">
				<tr>
					<th>订单编号</th>
					<th>日期</th>
					<th>送货地址</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<tr>
					<td class="list_data_text">1343445</td>
					<td class="list_data_text">2007年11月13日</td>
					<td class="list_data_text">北京海淀区劳动路205号</td>
					<td class="list_data_text">未回款</td>
					<td class="list_data_op">
						<button class="layui-btn layui-btn-normal" onclick="to('~cust/cust/orders_detail.html')"><img title="查看" src="../../images/查看.png"/>查看明细</button>
						<!--<img onclick="to('orders_detail.html');" title="查看明细" src="../../images/bt_detail.gif" class="op_button" /></td>-->
				</tr>
				<tr>
					<td class="list_data_text">1343444</td>
					<td class="list_data_text">2007年10月29日</td>
					<td class="list_data_text">北京海淀区劳动路205号</td>
					<td class="list_data_text">已回款</td>
					<td class="list_data_op">
						<button class="layui-btn layui-btn-normal" onclick="to('~cust/cust/orders_detail.html')"><img title="查看" src="../../images/查看.png"/>查看明细</button> </td>
				</tr>
				<tr>
					<td class="list_data_text">1343443</td>
					<td class="list_data_text">2007年10月29日</td>
					<td class="list_data_text">北京海淀区劳动路205号</td>
					<td class="list_data_text">已回款</td>
					<td class="list_data_op">
						<button class="layui-btn layui-btn-normal" onclick="to('~cust/cust/orders_detail.html')"><img title="查看" src="../../images/查看.png"/>查看明细</button> </td>
				</tr>
			</table>
			<div class="change_page" style="float: right; margin-right: 20px;">
				<table lay-skin="nob">
					<tr>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('1')">首页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('-')">上一页</button>&nbsp;&nbsp;</td>
						<td>
							<input type="text" required lay-verify="required" class="layui-input" style="width: 30px;" v-model="pages">
						</td>
						<td>
							<label>/{{sumpages}}</label>
							<button class="layui-btn layui-btn-primary" v-on:click="querypage('0')">跳转</button>
						</td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('+')">下一页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('2')">末页</button></td>
					</tr>
				</table>
			</div>
		</div>
	</body>

</html>
<script>
	function changes(str) {
		parent.document.getElementById("mywork").src = str;
	}
	new Vue({
		el: "#app",
		data: {
			pages: 1,
			sumpages: 25
		},
		methods: {
			querypage: function(str) {
				var pages = this.pages;
				switch(str) {
					case '+':
						if(eval(pages + "+" + 1) <= this.sumpages) {
							this.pages = eval(pages + "+" + 1);
						}
						break;
					case '-':
						if(eval(pages + "-" + 1) >= 1) {
							this.pages = eval(pages + "-" + 1);
						}
						break;
					case '0':
						break;
					case '1':
						this.pages = 1;
						break;
					case '2':
						this.pages = this.sumpages;
						break;
					default:
						break;
				}
			}
		}
	})
</script>